package imper.graphic.view;

import imper.graphic.listener.EndTurnListener;

import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;

import TWLSlick.RootPane;

import de.matthiasmann.twl.Button;

public class TradePropositionView extends BarMenuView
{
	// bouton validation
	private Button _btnValid = null;

	@Override
	public void init(GameContainer pGameContainer, StateBasedGame pStateBasedGame) throws SlickException
	{
		super.init(pGameContainer, pStateBasedGame);

	}

	@Override
	public void render(GameContainer arg0, StateBasedGame arg1, Graphics pGraphics) throws SlickException
	{
		// TODO Auto-generated method stub
		pGraphics.drawString("TRADE_PROPOSITION", 100, 100);
	}

	@Override
	public void update(GameContainer arg0, StateBasedGame arg1, int arg2) throws SlickException
	{
		// TODO Auto-generated method stub

	}
	
	protected void setViewRootPane(RootPane pRootPane)
	{
		_btnValid = new Button("fin de proposition");
		_btnValid.addCallback(new EndTurnListener(null));
		pRootPane.add(_btnValid);
//

	}

	protected void setViewLayout()
	{
		//
		_btnValid.adjustSize();
		_btnValid.setSize(20, 20);
		_btnValid.setPosition(100, 120);
	}

	@Override
	public int getID()
	{
		return EnumView.TRADE_PROPOSITION.getId();
	}

}
